
<template>
  <div class="course">
    <div class="top">
      特色课
      <van-icon class="search" name="search" />
    </div>
    <van-dropdown-menu>
      <van-dropdown-item title="分类" ref="item">
        <div class="itemBtn">
          <button>重置</button>
          <button class="que">确认</button>
        </div>
      </van-dropdown-item>
      <van-dropdown-item title="排序" v-model="value" :options="option" />

      <van-dropdown-item title="筛选" ref="item">
        <div>
          <ul class="btn">
            <li
              :class="{ active: liIndex == index }"
              v-for="(item, index) in arr"
              :key="index"
            >
              {{ item }}
            </li>
          </ul>
        </div>
      </van-dropdown-item>
    </van-dropdown-menu>
    
  </div>
</template>

<script>
export default {
  name: "",
  components: {},
  data() {
    return {
      arr: [
        "全部",
        "大班课",
        "小班课",
        "公开课",
        "点播课",
        "面授课",
        "音频课",
        "系统课",
        "图文课",
        "会员课",
      ],
      liIndex: 0,
      value: 0,
      switch1: false,
      switch2: false,
      option: [
        { text: "综合排序", value: 0 },
        { text: "最新", value: 1 },
        { text: "最热", value: 2 },
        { text: "价格从低到高", value: 3 },
        { text: "价格从高到低", value: 4 },
      ],
    };
  },
  created() {},
  mounted() {},
  methods: {
    onConfirm() {
      this.$refs.item.toggle();
    },
  },
};
</script>
<style scoped lang='scss'>
.course {
  background-color: #f2f3f5;
  .top {
    height: 54px;
    width: 100%;
    line-height: 54px;
    background-color: #fff;
    font-size: 27px;
    text-align: center;
    .search {
      float: right;
      margin-right: 10px;
      margin-top: 15px;
    }
  }
  .itemBtn {
    display: flex;
    height: 120px;
    justify-content: space-around;
    button {
      width: 45%;
      height: 45px;
      margin-top: 40px;
      background-color: #fff;
      border-radius: 5px;
       border:2px solid #1989fa;
       outline: none;
      //  border: none;
    }
    .que {
      color: rgb(255, 255, 255);
      background: rgb(235, 97, 0);
      border:2px solid rgb(235, 97, 0);
    }
  }
  .btn {
    display: flex;
    flex-wrap: wrap;
    li {
      width: 100px;
      height: 47px;
      text-align: center;
      line-height: 47px;
      margin: 14px 17px;
      background-color: #f5f5f5;
      color: #646464;
      font-size: 14px;
      border-radius: 5px;
    }
    .active {
      background: #ebeefe !important;
      color: #eb6100 !important;
    }
  }
}
</style>

